package com.jetpack_sunflower.viewmodels

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.jetpack_sunflower.data.GardenPlantingRepository
import com.jetpack_sunflower.data.PlantRespository

class PlantDetailViewModelFactory(
        private val plantRespository: PlantRespository,
        private val gardenPlantingRepository: GardenPlantingRepository,
        private val plantId: String
) : ViewModelProvider.NewInstanceFactory() {
    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return PlantDetailViewModel(plantRespository, gardenPlantingRepository, plantId) as T
    }
}